﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="index.aspx.cs" Inherits="index" Title="QUAN LY MOI TRUONG" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>


<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <link href="css/index.css" rel="stylesheet" type="text/css" />
   
   
    <table>
  <tr>
    <td colspan="2">
         
        
        <p id="divMsgs" runat="server">
        <asp:Label ID="Label1" runat="server" EnableViewState="False" Font-Bold="True" ForeColor="#FF8080"></asp:Label>
        <asp:Label ID="Label2" runat="server" EnableViewState="False" Font-Bold="True" ForeColor="#FFFFCC"></asp:Label>
            </p>      
         <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

            <script type="text/javascript">
              function RowSelected(sender, args)
    						    {
                                   var oWnd = radopen("thunghiem.aspx?_iddn=" +args.getDataKeyValue("Madnghiep"), "RadWindow1" ); 
                                   oWnd.maximize();
                                   oWnd.Center();
                                   oWnd.set_visibleStatusbar(false);
                                    sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());
                               }
          //  function RowDblClick(sender, eventArgs)
            //{
              //sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());
            //}
            </script>

        </telerik:RadCodeBlock>
          <fieldset id="divNhapLieu" style="width:500px;">
<legend style="margin-left:20px"><strong>Tìm kiếm</strong>
</legend>
<table cellpadding="2" cellspacing="1"  id="tblTimKiem">
<tr style="height: 19px;">
		<td style="width: 151px"><span style="font-size: 9pt; color: #000000;margin-left:20px;">
		    Tên DN:</span>
    </td>
        <td style="width: 369px"><span style="margin-left:40px;">
            <telerik:RadTextBox ID="txtTen" runat="server">
            </telerik:RadTextBox></span>
            
        </td>
</tr>
<tr style="height: 19px;">
		<td style="width: 146px"><span style="font-size: 9pt; color: #000000;margin-left:20px">
		    Năm hoạt động:</span>
    </td>
        <td style="width: 369px"><span style="margin-left:40px;">
          <telerik:RadTextBox ID="txtnam" runat="server">
            </telerik:RadTextBox> </span>       
    </td>
</tr>
<tr style="height: 19px;">
		<td style="width: 151px"><span style="font-size: 9pt; color: #000000;margin-left:20px;">
		    Địa chỉ:</span>
    </td>
        <td style="width: 369px"><span style="margin-left:40px;">
            <telerik:RadTextBox ID="txtDiaChi" runat="server">
            </telerik:RadTextBox></span>
        </td>
</tr>
		<tr>
            <td  colspan="2" align="center">
                <table width="100%"><tr><td style="height: 25px"><span style="margin-left:20px;">                
                    <telerik:RadButton ID="RadButton1" runat="server" Text="Tìm kiếm" Skin="Hay" OnClick="Button1_Click">
                    </telerik:RadButton></span>  
                </td>
                </tr></table>
      </td></tr>
    </table>
</fieldset>
         <!-- load ajax-->
         <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid_DN">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid_DN" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="divMsgs" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
        </telerik:RadAjaxManager>
        <!-- end-->
        
             
        
             <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
        <telerik:RadGrid ID="RadGrid_DN" runat="server" AllowPaging="True" 
            AllowSorting="True" CellSpacing="0" DataSourceID="SqlDataSource_dn" 
            GridLines="None" Skin="Telerik" AllowAutomaticDeletes="True" AutoGenerateColumns="False"
            AllowAutomaticUpdates="True" OnItemUpdated="RadGrid_DN_ItemUpdated"
            OnItemDeleted="RadGrid_DN_ItemDeleted" 
           OnItemInserted="RadGrid_DN_ItemInserted" OnDataBound="RadGrid_DN_DataBound"
            AllowAutomaticInserts="True" AllowMultiRowSelection="True"
            PagerStyle-Mode="NextPrevNumericAndAdvanced" PageSize="5" >
         
         
            <ClientSettings EnableRowHoverStyle="true">
               <Selecting AllowRowSelect="True" />
               <ClientEvents OnRowDblClick="RowSelected" />
           </ClientSettings>
            <HeaderContextMenu ></HeaderContextMenu>

            <PagerStyle Mode="NextPrevNumericAndAdvanced"></PagerStyle>

            <MasterTableView AutoGenerateColumns="False" DataSourceID="SqlDataSource_dn" DataKeyNames="Madnghiep" CommandItemDisplay="Top" >
            <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>

            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
            <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>

            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
            <HeaderStyle Width="20px"></HeaderStyle>
            </ExpandCollapseColumn>

    <Columns>  
    
           <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
                       
           </telerik:GridEditCommandColumn>
             
          <telerik:GridBoundColumn DataField="Madnghiep" DataType="System.Int32"  Visible="false"
            FilterControlAltText="Filter masp column" HeaderText="Madnghiep" ReadOnly="True" 
            SortExpression="Madnghiep" UniqueName="Madnghiep">
        </telerik:GridBoundColumn>
        
           <telerik:GridTemplateColumn HeaderText="STT">
                       <ItemTemplate>
                        <asp:Label runat="server" ID="lblSTT" Text='<%#i++%>'></asp:Label>
                       </ItemTemplate>
                 </telerik:GridTemplateColumn>
         
         <telerik:GridTemplateColumn HeaderText="Tên DN">                
                    <ItemTemplate>                    
                        <a href="thunghiem.aspx?_iddn=<%# Eval("Madnghiep") %>"><%# Eval("TenDN") %></a>
                    </ItemTemplate>                
        </telerik:GridTemplateColumn>
       
         <telerik:GridTemplateColumn HeaderText="Mã ql" UniqueName="maql">                
                    <ItemTemplate>                    
                        <a href="thunghiem.aspx?_iddn=<%# Eval("Madnghiep") %>"><%# Eval("maql") %></a>
                    </ItemTemplate>                
        </telerik:GridTemplateColumn>
        
         <telerik:GridDropDownColumn DataField="Mavung" DataSourceID="dn_vung"
                        HeaderText="Vung" ListTextField="Vung" ListValueField="Mavung"
                        UniqueName="Mavung" ColumnEditorID="GridDropDownColumnEditor1">
                    </telerik:GridDropDownColumn>
        
         <telerik:GridTemplateColumn HeaderText="Giám đốc" UniqueName="Giamdoc">                
                    <ItemTemplate>                    
                        <a href="thunghiem.aspx?_iddn=<%# Eval("Madnghiep") %>"><%# Eval("Giamdoc") %></a>
                    </ItemTemplate>                
        </telerik:GridTemplateColumn>
       
        <telerik:GridTemplateColumn HeaderText="Địa chỉ" UniqueName="Diachi">                
                    <ItemTemplate>                    
                        <a href="thunghiem.aspx?_iddn=<%# Eval("Madnghiep") %>"><%# Eval("Diachi") %></a>
                    </ItemTemplate>                
        </telerik:GridTemplateColumn> 
       
        <telerik:GridTemplateColumn HeaderText="Email" UniqueName="Email">                
                    <ItemTemplate>                    
                        <a href="thunghiem.aspx?_iddn=<%# Eval("Madnghiep") %>"><%# Eval("Email") %></a>
                    </ItemTemplate>                
        </telerik:GridTemplateColumn>
       
         <telerik:GridTemplateColumn HeaderText="Năm hoạt động" UniqueName="Namhd">                
                    <ItemTemplate>                    
                        <a href="thunghiem.aspx?_iddn=<%# Eval("Madnghiep") %>"><%# Eval("Namhd") %></a>
                    </ItemTemplate>                
        </telerik:GridTemplateColumn>
      
         <telerik:GridTemplateColumn HeaderText="Ngành" UniqueName="Nganh">                
                    <ItemTemplate>                    
                        <a href="thunghiem.aspx?_iddn=<%# Eval("Madnghiep") %>"><%# Eval("Nganh") %></a>
                    </ItemTemplate>                
        </telerik:GridTemplateColumn>
        
         <telerik:GridTemplateColumn HeaderText="Loại hình DN" UniqueName="LoaihinhDN">                
                    <ItemTemplate>                    
                        <a href="thunghiem.aspx?_iddn=<%# Eval("Madnghiep") %>"><%# Eval("LoaihinhDN") %></a>
                    </ItemTemplate>                
        </telerik:GridTemplateColumn>
        
         <telerik:GridTemplateColumn HeaderText="Quốc gia" UniqueName="Quocgia">                
                    <ItemTemplate>                    
                        <a href="thunghiem.aspx?_iddn=<%# Eval("Madnghiep") %>"><%# Eval("Quocgia") %></a>
                    </ItemTemplate>                
        </telerik:GridTemplateColumn>
        
         <telerik:GridTemplateColumn HeaderText="Ghi chú" UniqueName="Ghichu">                
                    <ItemTemplate>                    
                        <a href="thunghiem.aspx?_iddn=<%# Eval("Madnghiep") %>"><%# Eval("Ghichu") %></a>
                    </ItemTemplate>                
        </telerik:GridTemplateColumn>
        
        <telerik:GridTemplateColumn Visible="false">    
                    <HeaderTemplate>
                         <img alt="xoa" src="images/Delete.gif" />
                    </HeaderTemplate>               
                    <ItemTemplate>
                        <asp:CheckBox ID="cbGrid" runat="server" />
                    </ItemTemplate>
                    
         </telerik:GridTemplateColumn>
         
         <telerik:GridButtonColumn ConfirmText="Delete this Doanhnghiep?" ConfirmDialogType="RadWindow"
                        ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete"
                        UniqueName="DeleteColumn">
                        <ItemStyle HorizontalAlign="Center"/>                      
         </telerik:GridButtonColumn>
    </Columns>

            <EditFormSettings EditFormType="Template" ColumnNumber="2" CaptionDataField="Madnghiep" CaptionFormatString="Edit properties of Product {0}" InsertCaption="New Doanhnghiep">
            <EditColumn UniqueName="EditCommandColumn1" FilterControlAltText="Filter EditCommandColumn1 column"></EditColumn>
            
               <FormTemplate>
 
   
 <table id="table_dn" width="770px" style="border-style: none groove none groove; position: relative; margin-left:50px; background-color: #FFFFBB; vertical-align: middle;">
    <tr>
        <td colspan="6" align="center" style="height:70px;">
           <h2><asp:Label ID="lbAdd_dn" runat="server" Text="CẬP NHẬT THÔNG TIN DN"></asp:Label></h2> 
        </td>
    </tr>
    <tr>
     <td align="left">
        <span style="font-size: 9pt; color: rgb(0, 0, 0);">
		 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Mã quản lý</span><br />
           &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:TextBox ID="txtmaql" runat="server" Text='<%# Bind( "maql") %>' style="width: 97px;"></asp:TextBox>
     </td>
		
     <td align="left">
        <span style="font-size: 9pt; color: rgb(0, 0, 0);">
		 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tên doanh nghiệp</span><br />
         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:TextBox id="txttendn" runat="server" Text='<%# Bind( "TenDN") %>' style="width: 130px;"></asp:TextBox>
    </td>
        

        <td align="left">
          <span style="font-size: 9pt; color: rgb(0, 0, 0);">
		    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Giám đốc</span><br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:TextBox id="txtgiamdoc" runat="server" Text='<%# Bind( "Giamdoc") %>' style="width: 130px; "></asp:TextBox>
        </td>
       
</tr>
<tr>

        <td align="left">
        <span style="font-size: 9pt; color: rgb(0, 0, 0);">
		    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Địa chỉ</span><br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:TextBox id="txtdchi_dn" runat="server" Text='<%# Bind( "Diachi") %>' style="width: 130px; "></asp:TextBox>
        </td>
	
        <td align="left">
        <span style="font-size: 9pt; color: rgb(0, 0, 0);">
		    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Vùng </span><br />
           
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
           <telerik:RadComboBox ID="cb_vung" runat="server" DataSourceID="dn_vung" 
                Skin="Hay" DataTextField="Vung" DataValueField="Mavung" >               
            </telerik:RadComboBox>
           
        </td>

        <td align="left">
        <span style="font-size: 9pt; color: rgb(0, 0, 0);">
		    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Khu công nghiệp</span><br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
            <telerik:RadComboBox ID="cb_kcn" runat="server" DataSourceID="dn_kcn"
               Skin="Hay" DataTextField="TenKCN" DataValueField="Makcn" >
                <Items>
                <telerik:RadComboBoxItem Selected="true"/>
                </Items>
            </telerik:RadComboBox>
            
        </td>
</tr>
<tr>

        <td align="left">
        <span style="font-size: 9pt; color: rgb(0, 0, 0);">
		    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Điện thoại</span><br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  <asp:TextBox id="txtdthoai" runat="server" Text='<%# Bind( "Dthoai") %>' style="width: 130px;"></asp:TextBox>
        </td>

        <td align="left">
        <span style="font-size: 9pt; color: rgb(0, 0, 0);">
		    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fax</span><br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  <asp:TextBox id="txtfax" runat="server" Text='<%# Bind( "Fax") %>' style="width: 130px;size:20px;"></asp:TextBox>
        </td>

        <td align="left">
        <span style="font-size: 9pt; color: rgb(0, 0, 0);">
		    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Email</span><br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:TextBox id="txtemail_dn" runat="server" Text='<%# Bind( "Email") %>' style="width: 130px;"></asp:TextBox>
        </td>
</tr>
<tr>

        <td align="left">
        <span style="font-size: 9pt; color: rgb(0, 0, 0);">
		    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Website</span><br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  <asp:TextBox id="txtwebsite" runat="server" Text='<%# Bind( "Website") %>' style="width: 130px;"></asp:TextBox>
        </td>


        <td align="left" colspan="2">
        <span style="font-size: 9pt; color: rgb(0, 0, 0);">
		    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Số tài khoản</span><br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    <asp:TextBox id="txtstk" runat="server" Text='<%# Bind( "Sotaikhoan") %>' style="width: 130px;"></asp:TextBox>
        </td>
</tr>
<tr>

        <td align="left">
        <span style="font-size: 9pt; color: rgb(0, 0, 0);">
		    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tọa độ X</span><br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;      <asp:TextBox id="txtX" runat="server" Text='<%# Bind( "ToadoX") %>' style="width: 100px;"></asp:TextBox>
        </td>

        <td align="left">
        <span style="font-size: 9pt; color: rgb(0, 0, 0);">		
		    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tọa độ Y</span><br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    <asp:TextBox id="txtY" runat="server" Text='<%# Bind( "ToadoY") %>' style="width: 100px;"></asp:TextBox>
        </td>


        <td align="left">
        <span style="font-size: 9pt; color: rgb(0, 0, 0);">
		    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Năm hoạt động</span><br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     <asp:TextBox id="txtnamhd_dn" runat="server" Text='<%# Bind( "Namhd") %>' style="width: 100px; "></asp:TextBox>
        </td>
</tr>
<tr>        

        <td align="left" colspan="2">
        <span style="font-size: 9pt; color: rgb(0, 0, 0);">
		    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Loại hình doanh nghiệp</span><br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  <telerik:RadComboBox ID="cb_ldn" runat="server" Skin="Hay" Text='<%# Bind("LoaihinhDN") %>'>
                <Items>
                    <telerik:RadComboBoxItem runat="server" Text="Công ty TNHH 1 thành viên" 
                        Value="Công ty TNHH 1 thành viên" />
                    <telerik:RadComboBoxItem runat="server" Text="Doanh nghiệp Tư Nhân" 
                        Value="Doanh nghiệp Tư Nhân" />
                    <telerik:RadComboBoxItem runat="server" Text="Cổ phần" Value="Cổ phần" />
                    <telerik:RadComboBoxItem runat="server" Text="Công ty TNHH" 
                        Value="Công ty TNHH" />
                    <telerik:RadComboBoxItem runat="server" Text="Liên doanh" Value="Liên doanh" />
                    <telerik:RadComboBoxItem runat="server" Text="100% vốn nước ngoài" 
                        Value="100% vốn nước ngoài" />
                    <telerik:RadComboBoxItem runat="server" Text="Nhà nước " Value="Nhà nước " />
                    <telerik:RadComboBoxItem runat="server" Text="Chi nhánh" Value="Chi nhánh" />
                    <telerik:RadComboBoxItem runat="server" Text="DNNN" Value="DNNN" />
                    <telerik:RadComboBoxItem runat="server" Selected="True" Text="Hợp tác xã" 
                        Value="Hợp tác xã" />
                </Items>
            </telerik:RadComboBox>  
        </td>

        <td align="left" colspan="2">
        <span style="font-size: 9pt; color: rgb(0, 0, 0);">
		    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ngành</span><br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  <telerik:RadComboBox ID="cb_nganh" runat="server" Text='<%# Bind( "Nganh") %>' Skin="Default">
                <Items>
                    <telerik:RadComboBoxItem runat="server" Selected="True" Text="Chế biến" 
                        Value="Chế biến" />
                </Items>
            </telerik:RadComboBox>
        </td>

</tr>
<tr>

        <td align="left" colspan="2">
        <span style="font-size: 9pt; color: rgb(0, 0, 0);">
		    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Giấy phép kinh doanh</span><br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  <asp:TextBox id="txtGPKD" runat="server" Text='<%# Bind( "GPKN") %>' style="width: 130px;"></asp:TextBox>
        </td>

        <td align="left" colspan="2">
        <span style="font-size: 9pt; color: rgb(0, 0, 0);">
		    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ngày cấp giấy phép kinh doanh</span><br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   <telerik:RadDatePicker ID="RadDatePicker1" runat="server" Skin="Hay">
            </telerik:RadDatePicker>
	    </td>
</tr>
<tr>
	
        <td align="left" colspan="2">
        <span style="font-size: 9pt; color: rgb(0, 0, 0);">
		    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Giấy phép đầu tư</span><br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   <asp:TextBox id="txtGPDT" runat="server" Text='<%# Bind( "GPdautu") %>' style="width: 130px;"></asp:TextBox>
        </td>

        <td align="left" colspan="2">
        <span style="font-size: 9pt; color: rgb(0, 0, 0);">
		    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ngày cấp giấy phép đầu tư</span><br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   <telerik:RadDatePicker ID="RadDatePicker2" runat="server" Skin="Hay" >
            </telerik:RadDatePicker>
        </td>

</tr>
<tr>

        <td align="left">
        <span style="font-size: 9pt; color: rgb(0, 0, 0);">
		    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Qui trình sản xuất</span><br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   <asp:TextBox id="QTSX" runat="server" Text='<%# Bind( "Quytrinhsx") %>' style="width: 130px;"></asp:TextBox>
        </td>

        <td align="left">
        <span style="font-size: 9pt; color: rgb(0, 0, 0);">
		    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Quốc gia</span><br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:TextBox id="quocgia" runat="server" Text='<%# Bind( "Quocgia") %>' style="width: 130px;"></asp:TextBox>
        </td>

        <td align="left">
        <span style="font-size: 9pt; color: rgb(0, 0, 0);">
		    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tình hình hoat động</span><br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:TextBox id="tinhinhhd" runat="server" Text='<%# Bind( "Tinhhinhhd") %>' style="width: 130px;"></asp:TextBox>             
       </td>
</tr>
<tr>

   <td align="left">
   <span style="font-size: 9pt; color: rgb(0, 0, 0);">
 	   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Hình ảnh</span><br />
       &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  <telerik:RadAsyncUpload ID="RadAsyncUpload1" runat="server" Height="19px" 
           Skin="Telerik" Width="159px">
       </telerik:RadAsyncUpload>
    </td>
    
        <td colspan="2" align="left">
        <span style="font-size: 9pt; color: rgb(0, 0, 0);">
 	        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Ghi chú</span><br />
        
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  <telerik:RadEditor ID="RadEditor1" runat="server" Width="390px" 
                Height="182px">
                
                <Tools>
                    <telerik:EditorToolGroup Tag="MainToolbar">
                        <telerik:EditorSplitButton Name="Undo">
                        </telerik:EditorSplitButton>
                        <telerik:EditorSplitButton Name="Redo">
                        </telerik:EditorSplitButton>
                        <telerik:EditorTool Name="Cut" />
                        <telerik:EditorTool Name="Copy" />
                        <telerik:EditorTool Name="Paste" ShortCut="CTRL+V" />
                    </telerik:EditorToolGroup>
                    <telerik:EditorToolGroup Tag="Formatting">
                        <telerik:EditorTool Name="Bold" />
                        <telerik:EditorTool Name="Italic" />
                        <telerik:EditorTool Name="Underline" />
                        <telerik:EditorSeparator />
                        <telerik:EditorSplitButton Name="ForeColor">
                        </telerik:EditorSplitButton>
                        <telerik:EditorSplitButton Name="BackColor">
                        </telerik:EditorSplitButton>
                        <telerik:EditorSeparator />
                       
                    </telerik:EditorToolGroup>
                </Tools>
                <Content>     
                
                </Content>
            </telerik:RadEditor>
            </td>
            </tr>
           <tr>
                            <td align="right" colspan="2">
                                 <asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                    runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
                                </asp:Button>&nbsp;
                                        <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
                                        CommandName="Cancel"></asp:Button>
                                  
                                 
                            </td>
                        </tr>
        </table>
               </FormTemplate> 
            
            
            </EditFormSettings>
            </MasterTableView>

            
<FilterMenu EnableImageSprites="False"></FilterMenu>
        </telerik:RadGrid>
        
        <asp:SqlDataSource ID="SqlDataSource_dn" runat="server" ProviderName="System.Data.SqlClient"
          ConnectionString="<%$ ConnectionStrings:QLMTConnectionString %>"
          SelectCommand="SELECT * from [Doanhnghiep]"
           DeleteCommand="DELETE FROM [Doanhnghiep] WHERE [Madnghiep] = @original_Madnghiep"          
           InsertCommand="INSERT INTO Doanhnghiep(Maql, TenDN, Giamdoc, Diachi, Mavung, Makcn, Dthoai, Fax, Email, Website, Sotaikhoan, ToadoX, ToadoY, Namhd, LoaihinhDN, Nganh, GPKN, 
                      NgaycapGPKN, GPdautu, NgaycapGPDT, Quytrinhsx, Quocgia, Tinhhinhhd, Hinhanh, Ghichu)
                     VALUES (@Maql, @TenDN, @Giamdoc,@Diachi,@Mavung,@Makcn,@Dthoai,@Fax,@Email,@Website,@Sotaikhoan,@ToadoX,@ToadoY,@Namhd,@LoaihinhDN,@Nganh,@GPKN,
                     @NgaycapGPKN,@GPdautu,@NgaycapGPDT,@Quytrinhsx,@Quocgia,@Tinhhinhhd,@Hinhanh,@Ghichu)"
         
         UpdateCommand="UPDATE [Doanhnghiep] SET [TenDN] = @TenDN,[maql]=@Maql,[Giamdoc]=@Giamdoc,[Diachi]=@Diachi,[Mavung]=@Mavung,[Makcn]=@Makcn,[Dthoai]=@Dthoai,[Fax]=@Fax,[Email]=@Email,[Website]=@Website,[Sotaikhoan]=@Sotaikhoan,[ToadoX]=@ToadoX,[ToadoY]=@ToadoY,[Namhd]=@Namhd,[LoaihinhDN]=@LoaihinhDN,[Nganh]=@Nganh,[GPKN]=@GPKN,
                    [NgaycapGPKN]= @NgaycapGPKN,[GPdautu]=@GPdautu,[NgaycapGPDT]=@NgaycapGPDT,[Quytrinhsx]=@Quytrinhsx,[Quocgia]=@Quocgia,[Tinhhinhhd]=@Tinhhinhhd,[Hinhanh]=@Hinhanh,[Ghichu]=@Ghichu 
                    WHERE [Madnghiep] = @original_Madnghiep"
                    OldValuesParameterFormatString="original_{0}" ConflictDetection="CompareAllValues">
         
          
          <DeleteParameters>
               <asp:Parameter Name="original_Madnghiep" Type="Int32" />
           </DeleteParameters>
           
            <UpdateParameters>
               <asp:Parameter Name="TenDN" Type="String" />
               <asp:Parameter Name="Maql" Type="Int32" />
               <asp:Parameter Name="Giamdoc" Type="String" />
               <asp:Parameter Name="Diachi" Type="String" />
               <asp:Parameter Name="Mavung" Type="Int32" />
               <asp:Parameter Name="Makcn" Type="Int32" />
               <asp:Parameter Name="Dthoai" Type="String" />
               <asp:Parameter Name="Fax" Type="String" />
               <asp:Parameter Name="Email" Type="String" />
               <asp:Parameter Name="Website" Type="String" />
               <asp:Parameter Name="Sotaikhoan" Type="String" />
               <asp:Parameter Name="ToadoX" Type="Int32" />
               <asp:Parameter Name="ToadoY" Type="Int32" />
               <asp:Parameter Name="Namhd" Type="String" />
               <asp:Parameter Name="LoaihinhDN" Type="String" />
               <asp:Parameter Name="Nganh" Type="String" />
               <asp:Parameter Name="GPKN" Type="String" />
               <asp:Parameter Name="NgaycapGPKN" Type="DateTime" />
               <asp:Parameter Name="GPdautu" Type="String" />
               <asp:Parameter Name="NgaycapGPDT" Type="DateTime" />
               <asp:Parameter Name="Quytrinhsx" Type="String" />
               <asp:Parameter Name="Quocgia" Type="String" />
               <asp:Parameter Name="Tinhhinhhd" Type="String" />
               <asp:Parameter Name="Hinhanh" Type="String" />
               <asp:Parameter Name="Ghichu" Type="String" />
               
               
              
               <asp:Parameter Name="original_Madnghiep" Type="Int32" />
               
               
           </UpdateParameters>
           <InsertParameters>                
               
                <asp:Parameter Name="TenDN" Type="String" />
               <asp:Parameter Name="Maql" Type="Int32" />
               <asp:Parameter Name="Giamdoc" Type="String" />
               <asp:Parameter Name="Diachi" Type="String" />
               <asp:Parameter Name="Mavung" Type="Int32" />
               <asp:Parameter Name="Makcn" Type="Int32" />
               <asp:Parameter Name="Dthoai" Type="String" />
               <asp:Parameter Name="Fax" Type="String" />
               <asp:Parameter Name="Email" Type="String" />
               <asp:Parameter Name="Website" Type="String" />
               <asp:Parameter Name="Sotaikhoan" Type="String" />
               <asp:Parameter Name="ToadoX" Type="Int32" />
               <asp:Parameter Name="ToadoY" Type="Int32" />
               <asp:Parameter Name="Namhd" Type="String" />
               <asp:Parameter Name="LoaihinhDN" Type="String" />
               <asp:Parameter Name="Nganh" Type="String" />
               <asp:Parameter Name="GPKN" Type="String" />
               <asp:Parameter Name="NgaycapGPKN" Type="DateTime" />
               <asp:Parameter Name="GPdautu" Type="String" />
               <asp:Parameter Name="NgaycapGPDT" Type="DateTime" />
               <asp:Parameter Name="Quytrinhsx" Type="String" />
               <asp:Parameter Name="Quocgia" Type="String" />
               <asp:Parameter Name="Tinhhinhhd" Type="String" />
               <asp:Parameter Name="Hinhanh" Type="String" />
               <asp:Parameter Name="Ghichu" Type="String" />
              
           </InsertParameters>
           </asp:SqlDataSource>
        
        <asp:SqlDataSource ID="Sqldata_doangngiep" runat="server" 
            ConnectionString="<%$ ConnectionStrings:QLMTConnectionString %>" 
            SelectCommand="SELECT [Madnghiep], [TenDN], [Maql], [Giamdoc], [Diachi], [Email], [Namhd], [Nganh], [LoaihinhDN], [Quocgia], [Ghichu], [Tinhhinhhd] FROM [Doanhnghiep]"
            DeleteCommand="DELETE FROM [Doanhnghiep] WHERE [Madnghiep]=@Madnghiep">
        <DeleteParameters><asp:Parameter Name="Madnghiep" /></DeleteParameters>
        </asp:SqlDataSource>
        
         <asp:SqlDataSource ID="dn_vung" runat="server" 
                ConnectionString="<%$ ConnectionStrings:QLMTConnectionString %>" 
                SelectCommand="SELECT [Vung],[Mavung] FROM [QDxathaitheovung]"></asp:SqlDataSource>
        
        <asp:SqlDataSource ID="dn_kcn" runat="server" 
                ConnectionString="<%$ ConnectionStrings:QLMTConnectionString %>" 
                SelectCommand="SELECT [TenKCN],[Makcn] FROM [Khucongnghiep]"></asp:SqlDataSource>
       
        
       <telerik:GridTextBoxColumnEditor ID="GridTextBoxColumnEditor1" runat="server" TextBoxStyle-Width="200px" />
       <telerik:GridTextBoxColumnEditor ID="GridTextBoxColumnEditor2" runat="server" TextBoxStyle-Width="150px" />
       <telerik:GridDropDownListColumnEditor ID="GridDropDownColumnEditor1" runat="server" DropDownStyle-Width="110px" />
       <telerik:GridNumericColumnEditor ID="GridNumericColumnEditor1" runat="server" NumericTextBox-Width="40px" />
    
    </td>    
    </tr>
    
</table>
 
</asp:Content>

